package xhwl.insurance.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.insurance.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by Administrator on 2017/10/9.
 * 论坛详情评论
 */

public class CommentListApi extends BaseApi {
    ForumCommentReq req;


    public CommentListApi(String page_num, String post_id) {
        req = new ForumCommentReq(page_num, post_id);
    }


    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).ForumCommentList(requestBody);
    }

    private class ForumCommentReq {
        public String page_num;//页数
        public String post_id;


        public ForumCommentReq(String page_num, String post_id) {
            super();
            this.page_num = page_num;
            this.post_id = post_id;

        }
    }
}